<!-- include tpl=head_open -->
<script type="text/javascript">
function save()
{
	if(typeof(CKEDITOR) != "undefined"){
		for(var i in CKEDITOR.instances){
			CKEDITOR.instances[i].updateElement();
		}
	}
	var opener = $.dialog.opener;
	$("#post_save").ajaxSubmit({
		'url':get_url('tag','save'),
		'type':'post',
		'dataType':'json',
		'success':function(rs){
			if(rs.status){
				$.dialog.alert('标签提交成功',function(){
					opener.$.phpok.reload();
				},'succeed');
				return true;
			}
			opener.$.dialog.alert(rs.info);
			return false;
		}
	});
	return true;
}
</script>
<form method="post" id="post_save" onsubmit="return false">
	<!-- if $id --><input type="hidden" name="id" id="id" value="{$id}" /><!-- /if -->
<div class="table">
	<div class="title">
		{lang标签} <span class="note">请设置好相应的标签</span>
	</div>
	<div class="content">
		<input type="text" name="title" id="title" value="{$rs.title}" class="long" />
	</div>
</div>
<div class="table">
	<div class="title">
		提示文字 <span class="note">自定义链接的提示文字，有助于SEO优化</span>
	</div>
	<div class="content">
		<input type="text" name="alt" id="alt" value="{$rs.alt}" class="long" />
	</div>
</div>
<div class="table">
	<div class="title">
		目标网址 <span class="note">这里主要是填写外部网址，如不需要，请留空</span>
	</div>
	<div class="content">
		<input type="text" name="url" id="url" value="{$rs.url}" class="long" />
	</div>
</div>
<div class="table">
	<div class="title">
		打开方式 <span class="note">链接打开方式</span>
	</div>
	<div class="content">
		<ul class="layout">
			<li><label><input type="radio" name="target" value="1"{if $rs.target} checked{/if} />新窗口</label></li>
			<li><label><input type="radio" name="target" value="0"{if !$rs.target} checked{/if} />当前窗口</label></li>
		</ul>
	</div>
</div>
<div class="table">
	<div class="title">
		替换次数 <span class="note">请选择要替换的次数，默认为3次</span>
	</div>
	<div class="content">
		<ul class="layout">
			<li><label><input type="radio" name="replace_count" value="1"{if $rs.replace_count == 1} checked{/if} />1次</label></li>
			<li><label><input type="radio" name="replace_count" value="3"{if $rs.replace_count == 3 || !$rs.replace_count} checked{/if} />3次</label></li>
			<li><label><input type="radio" name="replace_count" value="5"{if $rs.replace_count == 5} checked{/if} />5次</label></li>
			<li><label><input type="radio" name="replace_count" value="7"{if $rs.replace_count == 7} checked{/if} />7次</label></li>
			<li><label><input type="radio" name="replace_count" value="9"{if $rs.replace_count == 9} checked{/if} />9次</label></li>
		</ul>
	</div>
</div>
<div class="table">
	<div class="title">
		全局属性 <span class="note">设置为是，表示系统为空时，会尝试以这些标签作为文章标签来使用</span>
	</div>
	<div class="content">
		<ul class="layout">
			<li><label><input type="radio" name="is_global" value="1"{if $rs.is_global} checked{/if} />是</label></li>
			<li><label><input type="radio" name="is_global" value="0"{if !$rs.is_global} checked{/if} />否</label></li>
		</ul>
	</div>
</div>
</form>
<!-- include tpl=foot_open -->